/* 基础布局 */
.popup-container {
  position: relative;
  width: 320px;
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

/* 标题栏 */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  margin-bottom: 10px;
}

.header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1;
}

/* Tab 样式 */
.tab-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tab-buttons {
  display: flex;
  border-bottom: 1px solid #ddd;
  margin-bottom: 16px;
}

.tab-btn {
  padding: 8px 16px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  color: #666;
}

.tab-btn.active {
  color: #1890ff;
  border-bottom: 2px solid #1890ff;
}

.tab-content {
  flex: 1;
}

.tab-pane {
  display: none;
  padding: 0 16px 10px;
}

.tab-pane.active {
  display: block;
}

/* 表单元素 */
.tab-container label {
  display: block;
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 3px;
  color: #1c1c1c;
}

.tab-container input,
.tab-container textarea,
.tab-container select {
  width: 100%;
  padding: 8px;
  margin-bottom: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 14px;
}

/* 按钮样式 */
.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 0;
  line-height: 1;
}

.close-btn:hover {
  color: #333;
}

/* 功能按钮通用样式 */
#saveConfig,
#resetPrompt,
.sync-btn {
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: white;
  margin-top: 8px;
  font-size: 15px;
}

#saveConfig {
  background: #1890ff;
  margin-top: 0;  /* 第一个按钮不需要上边距 */
}

#resetPrompt {
  background: #52c41a;
}

.sync-btn {
  background: #722ed1;
}

.sync-btn:disabled {
  background: #d9d9d9;
  cursor: not-allowed;
}

/* 页脚 */
.footer {
  padding: 16px;
  border-top: 1px solid #ddd;
}

.model-selector {
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
}

.model-selector:hover {
  border-color: #40a9ff;
}

.model-selector:focus {
  outline: none;
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24,144,255,0.2);
}

.folder-select {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 16px;
}

.folder-select input {
  flex: 1;
  margin-bottom: 0;
}

.folder-btn {
  padding: 4px 8px;
  white-space: nowrap;
  height: 100%;
  align-self: center;
}

.tips {
  padding: 5px;
  background-color: #f8f9fa;
  border-radius: 4px;
  font-size: 0.9em;
}

.tips p {
  margin: 5px 0;
}

.tips ol {
  margin: 4px 0;
  padding-left: 20px;
}

.tips li {
  margin: 2px 0;
}

.tip-link {
  font-size: 0.85em;
  color: #666;
}

.tip-link a {
  color: #0366d6;
  text-decoration: none;
}

.tip-link a:hover {
  text-decoration: underline;
}
